package dto

import (
	"github.com/e421083458/gin_scaffold/public"
	"github.com/gin-gonic/gin"
)

type LoginInput struct {
	Code string `json:"code" form:"code" comment:"code" example:"code" validate:"required"`
	Hid  int    `form:"hid" json:"hid" comment:"默认管理师"  example:"1"`
	Fid  int    `form:"fid" json:"fid" comment:"推荐人"  example:"1"`
}

func (params *LoginInput) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type File struct {
	Imgfile string `json:"imgfile" form:"imgfile" comment:"from-data:imgfile" example:"imgfile" validate:"required"`
}

func (params *File) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type Addday struct {
	Uid     int    `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Type    int    `json:"type" form:"type" comment:"type" example:"type" validate:"required"`
	Title   string `json:"title" form:"title" comment:"title" example:"title" validate:"required"`
	Content string `json:"content" form:"content" comment:"content" example:"content" validate:"required"`
	Images  string `json:"images" form:"images" comment:"images" example:"images" validate:"required"`
	Tag     int    `json:"tag" form:"tag" comment:"tag" example:"tag" validate:"required"`
	Class   int    `json:"class" form:"class" comment:"class" example:"class" validate:"required"`
}
type Addlist struct {
	Uid     int `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Type    int `json:"type" form:"type" comment:"type" example:"type" validate:"required"`
	Appoint int `json:"appoint" form:"appoint" comment:"appoint" example:"appoint" validate:"required"`
}
type Ana struct {
	Uid  int    `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Json string `json:"json" form:"json" comment:"json" example:"json" validate:"required"`
	Type int    `json:"type" form:"type" comment:"type" example:"type" validate:"required"`
}
type Space struct {
	Uid      int    `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Phone    string `json:"phone" form:"phone" comment:"phone" example:"phone" validate:"required"`
	Birthday string `json:"birthday" form:"birthday" comment:"birthday" example:"birthday" validate:"required"`
	Type     int    `json:"type" form:"type" comment:"type" example:"type" validate:"required"`
}

func (params *Space) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}
func (params *Ana) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}
func (params *Addlist) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type Addinfo struct {
	Id int `json:"id" form:"id" comment:"id" example:"id" validate:"required"`
}

func (params *Addinfo) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}
func (params *Addday) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type CkCodeList struct {
	Uid    int `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Status int `json:"status" form:"status" comment:"Status" example:"status" validate:""`
}

type CkCode struct {
	Fid   int    `json:"fid" form:"fid" comment:"FID" example:"fid" validate:"required"`
	Uid   int    `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Tcode string `json:"tcode" form:"tcode" comment:"tcode" example:"tcode" validate:"required"`
}

func (params *CkCode) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

//核销码列表
func (params *CkCodeList) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// Uid 同一个uid获取器
type Uid struct {
	Uid    int `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Status int `json:"status" form:"status" comment:"Status" example:"status" validate:""`
}

func (params *Uid) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// Uid 同一个uid获取器
type OrderSearch struct {
	Uid    int `json:"uid" form:"uid" comment:"UID" example:"uid" validate:""`
	Status int `json:"status" form:"status" comment:"Status" example:"status" validate:""`
}

func (params *OrderSearch) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// Uid 同一个uid获取器
type Dl struct {
	Did string `json:"did" form:"did" comment:"代理ID" example:"did" validate:"required"`
}

// did获取器
type Dl2 struct {
	Did int `json:"did" form:"did" comment:"代理ID" example:"did" validate:"required"`
}

func (params *Dl) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// did获取器检验
func (params *Dl2) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// Uid 同一个uid获取器
type Ddj struct {
	Uid int `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Id  int `json:"id" form:"id" comment:"ID" example:"uid" validate:"required"`
}

func (params *Ddj) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// Uid 同一个uid获取器
type Article struct {
	Id int `json:"id" form:"id" comment:"文章id" example:"id" validate:"required"`
}

func (params *Article) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// Uid 同一个uid获取器
type Appoint struct {
	Uid    int `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	AppoId int `json:"appoid" form:"appoid" comment:"查询会员Id" example:"appoid" validate:"required"`
	Type   int `json:"type" form:"type" comment:"type" example:"type" validate:"required"`
}

func (params *Appoint) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type Appoint2 struct {
	Uid    int `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	AppoId int `json:"appoid" form:"appoid" comment:"查询会员Id" example:"appoid" validate:"required"`
}

func (params *Appoint2) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// Address
type Address struct {
	Id int `json:"id" form:"id" comment:"ID" example:"id" validate:""`
	//Uid      int    `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Username string `json:"username" form:"username" comment:"收货人" example:"username" validate:"required"`
	Tel      string `json:"tel" form:"tel" comment:"电话" example:"电话" validate:"required"`
	Province string `json:"province" form:"province" comment:"省" example:"province" validate:"required"`
	City     string `json:"city" form:"city" comment:"市" example:"市" validate:"required"`
	County   string `json:"county" form:"county" comment:"县区" example:"县区" validate:"required"`
	Detail   string `json:"detail" form:"detail" comment:"具体地址" example:"detail" validate:"required"`
	Default  int    `json:"default" form:"default" comment:"默认" example:"default" validate:""`
}

//提现
type UserExtract struct {
	Id int `json:"id" form:"id" comment:"ID" example:"id" validate:""`
	//Uid          int     `json:"uid"`
	RealName     string  `json:"real_name" form:"real_name" comment:"真实姓名" example:"real_name" validate:""`
	ExtractType  string  `json:"extract_type" form:"extract_type" comment:"提现类型" example:"extract_type" validate:""`
	BankCode     string  `json:"bank_code,omitempty" form:"bank_code" comment:"银行卡号" example:"bank_code" validate:""`
	BankAddress  string  `json:"bank_address,omitempty" form:"bank_address" comment:"开户地址" example:"bank_address" validate:""`
	ExtractPrice float64 `json:"extract_price,omitempty" form:"extract_price" comment:"提现金额" example:"extract_price" validate:"required"`
	Mark         string  `json:"mark,omitempty" form:"mark" comment:"备注" example:"mark" validate:""`
	Blance       float64 `json:"balance,omitempty" form:"balance" comment:"余额" example:"blance" validate:""`
	Status       int     `json:"status,omitempty" form:"status" comment:"提现状态" example:"status" validate:""`
	BankName     string  `json:"bank_name,omitempty" form:"bank_name" comment:"银行名称" example:"bank_name" validate:""`
	IdNum        string  `json:"id_num,omitempty" form:"id_num" comment:"身份证号" example:"id_num" validate:""`
	PhoneNum     string  `json:"phone_num,omitempty" form:"phone_num" comment:"手机号码" example:"phone_num" validate:""`
}

func (params *UserExtract) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

func (params *Address) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

//数字脉诊 结果查询
type Pulse struct {
	Id int `json:"id" form:"id" comment:"检查序号" example:"id" validate:"required"`
}

func (params *Pulse) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

//数字脉诊解锁
type PulseLock struct {
	Id   int `json:"id" form:"id" comment:"检查序号" example:"id" validate:"required"`
	Uid  int `json:"uid" form:"uid" comment:"会员id" example:"uid" validate:"required"`
	Type int `json:"type" form:"type" comment:"解锁类型1五脏>2六腑>3体质>4大病" example:"type" validate:"required"`
}

func (params *PulseLock) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

//直推传参
type Tuser struct {
	Uid int `form:"uid" json:"uid" comment:"uid" validate:""`
}

func (params *Tuser) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

//完善个人信息
type UserInfo struct {
	Uid        int    `json:"uid" form:"uid" comment:"会员id" example:"uid" validate:""`
	TrueName   string `json:"truename" form:"truename" comment:"姓名" example:"truename" validate:""`
	Headimgurl string `json:"headimgurl" form:"headimgurl" comment:"头像" example:"headimgurl" validate:""`
	UserPhone  string `json:"userphone" form:"userphone" comment:"电话" example:"userphone" validate:""`
	Sex        int    `json:"sex" form:"sex" comment:"性别1男2女" example:"sex" validate:""`
	Birthday   string `json:"birthday" form:"birthday" comment:"出生年月日/1990-08-08" example:"birthday" validate:""`
	IdCard     string `json:"id_card" form:"id_card" comment:"银行卡号" example:"id_card" validate:""`
}

//核销码信息
type CodeInfo struct {
	Uid       int    `json:"uid" form:"uid" comment:"会员id" example:"uid" validate:"required"`
	TrueName  string `json:"truename" form:"truename" comment:"姓名" example:"truename" validate:"required"`
	UserPhone string `json:"userphone" form:"userphone" comment:"电话" example:"userphone" validate:"required"`
	Sex       int    `json:"sex" form:"sex" comment:"性别1男2女" example:"sex" validate:"required"`
	Birthday  string `json:"birthday" form:"birthday" comment:"出生年月日/1990-08-08" example:"birthday" validate:"required"`
}

func (params *UserInfo) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// Uid 数字脉诊提交
type PulseAdd struct {
	Uid           int `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
	Leftrate      int `json:"leftrate" form:"leftrate" comment:"左侧心率" example:"80" validate:"required"`
	Leftlowpre    int `json:"leftlowpre" form:"leftlowpre" comment:"左侧低压" example:"60" validate:"required"`
	Lefthightpre  int `json:"lefthightpre" form:"lefthightpre" comment:"左侧高压" example:"111" validate:"required"`
	Rightrate     int `json:"rightrate" form:"rightrate" comment:"右侧心率" example:"70" validate:"required"`
	Rightlowpre   int `json:"rightlowpre" form:"rightlowpre" comment:"右侧高压" example:"60" validate:"required"`
	Righthightpre int `json:"righthightpre" form:"righthightpre" comment:"右侧低压" example:"100" validate:"required"`
}

func (params *PulseAdd) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

// Uid 数字脉诊提交
type PulseXin struct {
	Uid int `json:"uid" form:"uid" comment:"UID" example:"uid" validate:"required"`
}

func (params *PulseXin) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type ListPageInput struct {
	PageSize int    `form:"page_size" json:"page_size" comment:"每页记录数" validate:"" example:"10"`
	Page     int    `form:"page" json:"page" comment:"页数" validate:"required" example:"1"`
	Name     string `form:"name" json:"name" comment:"姓名" validate:"" example:""`
}

func (params *ListPageInput) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type AddUserInput struct {
	Name  string `form:"name" json:"name" comment:"姓名" validate:"required"`
	Sex   int    `form:"sex" json:"sex" comment:"性别" validate:""`
	Age   int    `form:"age" json:"age" comment:"年龄" validate:"required,gt=10"`
	Birth string `form:"birth" json:"birth" comment:"生日" validate:"required"`
	Addr  string `form:"addr" json:"addr" comment:"地址" validate:"required"`
}

func (params *AddUserInput) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type FindMoto struct {
	Id int `form:"id" json:"id" comment:"id" validate:"required"`
}

func (params *FindMoto) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type FindToken struct {
	Uid int `form:"uid" json:"uid" comment:"uid" validate:"required"`
	//Token  string `form:"token" json:"token" comment:"token" validate:"required"`

}

func (params *FindToken) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type EditUserInput struct {
	Id    int    `form:"id" json:"id" comment:"ID" validate:"required"`
	Name  string `form:"name" json:"name" comment:"姓名" validate:"required"`
	Sex   int    `form:"sex" json:"sex" comment:"性别" validate:""`
	Age   int    `form:"age" json:"age" comment:"年龄" validate:"required,gt=10"`
	Birth string `form:"birth" json:"birth" comment:"生日" validate:"required"`
	Addr  string `form:"addr" json:"addr" comment:"地址" validate:"required"`
}

func (params *EditUserInput) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type RemoveUserInput struct {
	IDS string `form:"ids" json:"ids" comment:"IDS" validate:"required"`
}

func (params *RemoveUserInput) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

//抢购表单验证

type FlashBuy struct {
	Uid int `form:"uid" json:"uid" comment:"用户Id" validate:"required"`
	Id  int `form:"id" json:"id" comment:"车机Id" validate:"required"` //车机Id
}

func (params *FlashBuy) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}
